#ifndef PROJECT_H
#define PROJECT_H

#include <QString>
#include <QVector>

#include "common/parameters.h"
#include "common/types.h"
#include "common/settings.h"

#define NEW_PROJECT 0
#define EXISTING_PROJECT 1

class Project
{
public:
    Project(const QString &dir, const QString &file_name, int _st = NEW_PROJECT,
            int n_configs = 1);
    inline const QString& directory() const {return _dir;}
    inline const QString& file_name() const {return _filename;}
    const QString full_path() const;
    void change_state();
    inline int get_state() {return _state;}
    void clean_datfile(int config, const QString &datfile);
    const QVector<Parameters *> read_params_file(const QString &file) const;
    bool file_exist(int configuration, const QString &name_file) const;
    QString get_config_dir(int configuration) const;
    inline void setConfigs(int nconfigs){ _nconfigs = nconfigs;}
    inline void setState(int state){ _state = state;}
    inline int getConfig() const {return _nconfigs;}
private:
    QString _dir; // the directory of the current project
    QString _filename; // the filename of the current project
    int _nconfigs; // the total configurations of the current project
    int _state; // the state fo the current project
};

#endif // PROJECT_H
